
public class Cube {
	
	public int cornerOrientation = 0;
	public int edgeOrientation = 0;
	public int cornerPermutation = 0;
	public  int edgePermutation = 0;
	/*
	 these are the true values - where the cube is defined as these four.
	 in order to generate the huge(18x2186, 6 x 2047, 18 x 40319? edge permutation will be done
	 with some math instead of a huge table(270GB??!)
	 
	 
	*/
	/*
	CornerCubie ULB = new CornerCubie(0,0);
	CornerCubie URB = new CornerCubie(0,1);
	CornerCubie ULF = new CornerCubie(0,2);
	CornerCubie URF = new CornerCubie(0,3);
	CornerCubie DLB = new CornerCubie(0,4);
	CornerCubie DRB = new CornerCubie(0,5);
	CornerCubie DLF = new CornerCubie(0,6);
	CornerCubie DRF = new CornerCubie(0,7);
	
	
	EdgeCubie UB = new EdgeCubie(true,0);
	EdgeCubie UL = new EdgeCubie(true,1);
	EdgeCubie UR = new EdgeCubie(true,2);
	EdgeCubie UF = new EdgeCubie(true,3);						//Defining the cube as a sum of all of the cubies
	EdgeCubie BL = new EdgeCubie(true,4);						// all of which have a permutation and orientation
	EdgeCubie BR = new EdgeCubie(true,5);
	EdgeCubie FL = new EdgeCubie(true,6);
	EdgeCubie FR = new EdgeCubie(true,7);
	EdgeCubie DB = new EdgeCubie(true,8);
	EdgeCubie DL = new EdgeCubie(true,9);
	EdgeCubie DR = new EdgeCubie(true,10);
	EdgeCubie DF = new EdgeCubie(true,11);
	
	*/
	private boolean isBG(int a){
		if (a == 2 || a == 4) return true;
		return false;
		
	}
	private boolean isWY(int a){
		if (a < 2) return true;
		return false;
	}
	private boolean isRO(int a){
		if (a == 3 || a == 5) return true;
		return false;
	}
	
	
	public void toCoordinate(int[][] up, int[][] down, int[][] front, int[][] right, int[][] back, int[][] left){
		//lets do EO first
		int EO = 0;
		if (isRO(up[0][1])) EO ^= 1024;
		if (isRO(up[1][0])) EO ^= 512;
		if (isRO(up[1][2])) EO ^= 256;
		if (isRO(up[2][1])) EO ^= 128;
		
		if (isRO(front[1][0])) EO ^= 16;
		if (isRO(front[1][2])) EO ^= 8;
		if (isRO(back[1][2])) EO ^= 64;
		if (isRO(back[1][0])) EO ^= 32;
		
		
		if (isRO(down[1][0])) EO ^= 1;
		if (isRO(down[1][2])) EO ^= 2;
		if (isRO(down[2][1])) EO ^= 4;
		// if green/yellow and side is yellow/white ^=
		// goddammit joey
		
		if (isBG(up[0][1]) && isWY(back[0][1])) EO ^= 1024;
		if (isBG(up[1][0]) && isWY(left[0][1])) EO ^= 512;
		if (isBG(up[1][2]) && isWY(right[0][1])) EO ^= 256;
		if (isBG(up[2][1]) && isWY(front[0][1])) EO ^= 128;
		
		if (isBG(front[1][2]) && isWY(right[1][0])) EO ^= 8;
		if (isBG(front[1][0]) && isWY(left[1][2])) EO ^= 16;
		if (isBG(back[1][2]) && isWY(left[1][0])) EO ^= 32;
		if (isBG(back[1][0]) && isWY(right[1][2])) EO ^= 64;
		
		if (isBG(down[1][0]) && isWY(left[2][1])) EO ^= 1;
		if (isBG(down[1][2]) && isWY(right[2][1])) EO ^= 2;
		if (isBG(down[2][1]) && isWY(back[2][1])) EO ^= 4;
		
		//That's EO, by far the easiest
		
		int[] cornerUpFaces = {up[0][0],up[0][2],up[2][0],up[2][2], down[0][0],down[0][2], down[2][2],down[0][2]};
		int[] stringCO = new int[8];
		for (int s=0;s<cornerUpFaces.length;s++){
			if (isWY(cornerUpFaces[s])){
				stringCO[s] = 0;
			}
		}
		//do the same thing as above for 1 and 2, make sure arrays are in the right order.
		
		
	}
	public Cube(){
		
	}


	
}
